<%--
  Created by IntelliJ IDEA.
  User: adminthy
  Date: 2018/6/17
  Time: 18:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html>
<head>
    <title>分类添加</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <style type="text/css">
        body{
            font-family: "微软雅黑";
            background-color: #EDEDED;
        }
        h2{
            text-align: center;
        }
        table{
            margin: 0 auto;
            /* width: 96%; */
            text-align: center;
            border-collapse:collapse;
        }
        td, th{ padding: 7px;}
        th{
            background-color: #DCDCDC;
        }
        th.ths{
            width: 100px;
        }
        input.pnum{
            width:80px;
            height:25px;
            font-size: 18px;
            text-align:center;
        }

    </style>

    <!--引入jquery的js库-->
    <script src="js/jquery-1.12.4.js"></script>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="bootstrap-3.3.7-dist/css/bootstrap.css">

    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="bootstrap-3.3.7-dist/css/bootstrap-theme.css">

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="bootstrap-3.3.7-dist/js/bootstrap.js"></script>
    <style>

    </style>
</head>
<body>

<div class="wrapper" style="padding: 5% 20%;">
    <h1 style="text-align: center; margin-bottom: 40px;">添加分类</h1>
    <form action="${app}/CategoryAddServlet" class="form-horizontal" method="post">
        <c:if test="${not empty requestScope.errorMsg.all}">
            <p class="text-danger">${requestScope.errorMsg.all}</p>
        </c:if>

        <div class="form-group">
            <label for="input-cname" class="col-sm-2 control-label">分类名称</label>
            <div class="col-sm-10">
                <input name="cname" type="text" class="form-control" id="input-cname" placeholder="分类名称">
                <span class="text-danger">${requestScope.errorMsg.cname}</span>
            </div>
        </div>
        <div class="form-group">
            <label for="input-desc" class="col-sm-2 control-label">分类描述</label>
            <div class="col-sm-10">
                <textarea name="desc" class="form-control" id="input-desc" placeholder="分类描述"></textarea>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10" style="text-align: right; padding-right: 10%;">
                <button type="submit" class="btn btn-default">添加</button>
            </div>
        </div>
    </form>
</div>


</body>
</html>



